package Arry一维数组;

import java.util.Scanner;

//输出英文星期几
//        用一个数组，保存星期一到星期天的7个英语单词，从键盘输入1-7，显示对应的单词
//        {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"}
public class Arry01 {
    public static void main(String[] args) {
        String []weeks= {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个数字：");
        int n=sc.nextInt();
        if(n<1||n>7){
            System.out.println("输入错误");
        }else {
            System.out.println(weeks[n-1]);
        }
    }
}
